<template>
    <div>
        <headers/>
        <left/>
        <van-uploader :after-read="upload"/>导入
    </div>
</template>

<script>
import headers from '../comm/headers.vue'
import left from '../comm/left.vue'
import axios from 'axios'

    export default {
        components:{
            'headers':headers,
            'left':left
        },
        methods:{
            upload(file){
                let formData = new FormData()
                formData.append('file',file.file)
                axios({url:'upload',method:'post',data:formData})
                .then(res=>{
                    console.log(res)
                })
            },
        }
    }
</script>

<style scoped>

</style>